<?php

namespace app\teacher\model;

use think\Model;

class Order extends Model
{
    /**
     * 订单号搜索
     * @param  [type] $query [description]
     * @param  [type] $value [description]
     * @param  [type] $data  [description]
     * @return [type]        [description]
     */
    public function searchOrderSnAttr($query, $value='', $data)
    {
        if ($value) {
            $query->whereRaw("o.order_sn like :order_sn", ['order_sn' => $value]);
        }
    }
}
